package com.basin.common.mongo.config;

import com.anwen.mongo.transactional.MongoPlusTransactionalManager;
import com.mongodb.TransactionOptions;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author: Sam ZHONG | sammy1997@aliyun.com
 */
@Configuration
public class MongoPlusConfig {
    @Bean(name = "mongoTransactionManager")
    public MongoPlusTransactionalManager mongoTransactionManager() {
        return new MongoPlusTransactionalManager(TransactionOptions.builder().build());
    }
}
